<%@include file="../context.jsp"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Stock Screener</title>
<%@include file="../common_imports.jsp"%>
<script type="text/javascript">
	$(document).ready(function() {
		$('#myTab a').click(function(e) {
			e.preventDefault();
			$(this).tab('show');
		})
		$(function() {
			$('#myTab a:first').tab('show');
		});
	});
</script>
</head>
<body>
	<div class="main_wrapper">
		<div class="container-fluid">
			<div class="row-fluid">
				<%@include file="../stockscreener/header.jsp"%>
			</div>
			<div class="row-fluid">
				<div class="main_menu_wrapper span12">
					<div class="navbar">
						<div class="navbar-inner">
							<div class="container">
								<button class="btn btn-navbar collapsed"
									data-target=".nav-collapse" data-toggle="collapse"
									type="button">
									<div class="icon_wrapper"
										style="float: right; padding: 5px 10px;">
										<span class="icon-bar"></span> <span class="icon-bar"></span>
										<span class="icon-bar"></span>
									</div>
								</button>

								<div class="nav-collapse collapse">
									<%@include file="../header_link.jsp"%>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="row-fluid">
				<form:form method="POST" commandName="user"
					action="${pageContext.request.contextPath}/user/edit/${user.id}.html"
					class="form-horizontal">
					<div>${message}</div>
					<div class="control-group">
						<label class="control-label" for="inputEmail">User Name</label>
						<div class="controls">
							<label>${user.userName}</label>
							<form:hidden path="userName" />
						</div>
						<div class="controls">
							<form:errors path="userName" cssClass="error"></form:errors>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="inputEmail">Password :</label>
						<div class="controls">
							<form:password path="password" />
						</div>
						<div class="controls">
							<form:errors path="password" cssClass="error"></form:errors>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="inputEmail">Email :</label>
						<div class="controls">
							<label>${user.email}</label>
							<form:hidden path="email" />
						</div>
						<div class="controls">
							<form:errors path="email" cssClass="error"></form:errors>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="inputEmail">Telephone :</label>
						<div class="controls">
							<form:input path="telephone" />
						</div>
						<div class="controls">
							<form:errors path="telephone" cssClass="error"></form:errors>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="inputEmail">Address :</label>
						<div class="controls">
							<form:textarea path="address" />
						</div>
					</div>
					<div class="controls">
						<form:hidden path="userCategory.id" />
					</div>
					<div class="controls">
						<form:hidden path="id"></form:hidden>
					</div>
					<input class="btn btn-inverse save" type="submit" value="Save" />
				</form:form>
				<c:if test="${userLogged }">
					<div class="btn btn-info">
						<a href="/StockScreener">Home</a>
					</div>
				</c:if>
			</div>
		</div>
	</div>
	<div class="footer_wrapper">
		<%@include file="../footer.jsp"%>
	</div>
</body>
</html>